package com.lqk.facade;



/**
 * @author lqk
 * @date 2021/12/6 18:04
 *
 * DVD
 */
public class DVDPlayer {

    private DVDPlayer(){

    }
    // 使用单例模式，静态内部类
    private static class DVDPlayerInstance{
        private static final DVDPlayer INSTANCE = new DVDPlayer();
    }

    // 提供一个静态的公有方法，直接返回 SingletonInstance.INSTANCE
    public static DVDPlayer getInstance(){
        return DVDPlayer.DVDPlayerInstance.INSTANCE;
    }

    public void on(){
        System.out.println(" dvd on ");
    }
    public void off(){
        System.out.println(" dvd off ");
    }
    public void play(){
        System.out.println(" dvd is playing ");
    }

    public void pause(){
        System.out.println(" dvd pause ");
    }
}
